#include "OriginImg.hpp"

void OriginImg::Start(const std::filesystem::path& savepath,const BaseFormatAdditionalInf& info)
{
  ofile.open(savepath,std::ios::trunc);
  if(!ofile.is_open())
    throw std::runtime_error("can't open file");
}

void OriginImg::FileSaveFuncCall(const ImageType& data)
{
  ofile.write((char*)data.data,data.size);
}

void OriginImg::Stop()
{
  ofile.close();
}
